package com.steak.business.client;

import com.steak.common.domain.dataobject.tcc.FreezeStock;
import com.steak.common.domain.dataobject.tcc.Stock;
import com.steak.common.domain.dto.StockDTO;
import com.steak.common.domain.dto.UpdateStockDTO;
import com.steak.common.result.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author 刘牌
 * @Title:
 * @date 2022/3/116:25
 */
@FeignClient(value = "cloud-stock")
public interface StockClient {

    @RequestMapping("/stock/decreaseStock")
    Response decreaseStock(@RequestBody StockDTO stock);

    @RequestMapping("/stock/queryByUserId")
    FreezeStock queryByUserId(@RequestParam Integer userId);

    @RequestMapping("/stock/saveFreezeStock")
    Response saveFreezeStock(@RequestBody FreezeStock freezeStock);

    @RequestMapping("/stock/deleteFreezeRecordByUserId")
    Response deleteFreezeRecordByUserId(@RequestParam Integer userId);

    @RequestMapping("/stock/updateStockNumByUserId")
    Response updateStockNumByUserId(UpdateStockDTO buildUpdateStockDTO);
}
